import {createWebHashHistory,createRouter} from "vue-router";

import index from '../view/index.vue'
import adopt from '../view/adopt.vue'
import foster from '../view/foster.vue'
import manager from '../view/manager.vue'
import pet from '../view/pet.vue'
import user from '../view/user.vue'
import login from '../view/Login.vue'
import adoptBooking from '../view/adoptBooking.vue'
import fosterBooking from '../view/fosterBooking.vue'
import userIndex from '../view/userIndex.vue'
import userlogin from '../view/userLogin.vue'
import useradoptBooking from '../view/useradoptBooking.vue'
import userfosterBooking from '../view/userfosterBooking.vue'
import userpet from '../view/userpet.vue'
import register from '../view/register.vue'
import userRegister from '../view/userRegister.vue'
import changePassword from '../view/changePassword.vue'
import changeInfo from '../view/changeInfo.vue'
import deepseek from '../view/deepseek.vue'
import table from '../view/table.vue'


//新路由
// router/index.js
import Homepage from '../view/homepage.vue';



// 定义有哪些路由
const routes = [
    { path: '/', component: Homepage },
    {
        path: '/login',
        name: 'login',
        component: login
    },
    {
        path: '/register',
        name: 'register',
        component: register
    },
    {
        path: '/userlogin',
        name: 'userlogin',
        component: userlogin
    },
    {
        path: '/userRegister',
        name: 'userRegister',
        component: userRegister
    },
    {
        path: '/index',
        name: 'index',
        component: index,
        children: [
            {
                path: '/adopt',component: adopt
            },
            {
                path: '/foster',component: foster
            },
            {
                path: '/pet',component: pet
            },
            {
                path: '/user',component: user
            },
            {
                path: '/manager',component: manager
            },
            {
                path: '/adoptBooking',component: adoptBooking
            },
            {
                path: '/fosterBooking',component: fosterBooking
            },
            {
                path: '/table',component: table
            },

        ]
    },
    {
        path:'/userIndex',
        name: 'userIndex',
        component: userIndex,
        children: [
            {
                path: '/useradoptBooking',component: useradoptBooking
            },
            {
                path: '/userfosterBooking',component: userfosterBooking
            },
            {
                path: '/userpet',component: userpet
            },
            {
                path: '/deepseek',component: deepseek
            },
        ]
    },
    {
        path:'/userIndex/changePassword',
        name: 'changePassword',
        component: changePassword
    },
    {
        path:'/userIndex/changeInfo',
        name: 'changeInfo',
        component: changeInfo
    }
]



const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router;


































